<%@ page language="java" import="java.util.*,zhjb.platform.module.schedule.bean.*" pageEncoding="UTF-8"%>
<%@page import="java.text.SimpleDateFormat"%>
<%
List<ScheduleTask> taskList=request.getAttribute("taskList")==null?null:(List<ScheduleTask>)request.getAttribute("taskList");
String taskIds=request.getAttribute("taskIds")==null?"":request.getAttribute("taskIds").toString();
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
%>
<%if(taskList!=null){
	for(ScheduleTask task:taskList){%>
		<li>
			<%=task.getTitle()+"&nbsp;&nbsp;"+sdf.format(task.getStart())+"&nbsp;&nbsp;"+sdf.format(task.getEnd()) %>&nbsp;&nbsp;&nbsp;
			<a href="javascript:;" onclick="deleteTask('<%=task.getId()%>')">删除</a>
		</li>
	<%}
}%>
<script>
	var ids="<%=taskIds%>";
	function deleteTask(id){
		if(confirm("确定删除这个日程吗？")){
			var url="${pageContext.request.contextPath}/schedule/findTask.zhtml?taskIds="+ids+"&_rad="+new Date().getTime()+"&deleteId="+id;
			$.get(url,function(data){
				$("#content").html(data);
				changeDate($("#theyear").val(),$("#themonth").val());
			});
		}
	}
</script>